home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1993 / MacHack 1993.toast / MacHack™ 1987-1992 / MacHack™ '90 / Other Stuff / Demos ƒ / Demo AppMaker / Demo AppMaker™ / Demo AppMaker™.rsrc / TmpP_1013_Popup < prev    next >
Encoding:
Text File  |  1990-03-23  |  1.0 KB  |  47 lines

  1. %case window field%
  2. %case create%
  3. %case dispose%
  4. %case mousein%
  5.     SetRect (bounds, %left%, %top%, %right%, %bottom%);
  6.     if PtInRect (where, bounds) then begin
  7.         TrackPopup (bounds, %popupID%, %FieldName%);
  8.     end;
  9. %case update%
  10.     SetRect (bounds, %left%, %top%, %right%, %bottom%);
  11.     UpdatePopup (bounds, %popupID%, %FieldName%);
  12. %case activate%
  13. %case track%
  14. %case itemNr%
  15.     %DefineItem%
  16. %case dialog field%
  17.     %fieldname%:%    %integer;
  18. %case init field%
  19.     %fieldname% := 1;
  20. %case auxiliary%
  21.     {----------}
  22.     var
  23.         X%Fieldname%:    integer;
  24.     
  25.     {----------}
  26.     Procedure Draw%Itemname% (whichDialog:    DialogPtr;
  27.                           itemNr:        integer);
  28.     Begin
  29.         DrawPopup (itemNr, %popupID%, X%Fieldname%);
  30.     End; {Draw%Itemname%}
  31.     
  32. %case filter%
  33. %case set%
  34.     X%Fieldname% := %Fieldname%;
  35.     SetUserItem (%Itemname%, @Draw%Itemname%);
  36. %case hit%
  37.     %itemname%: begin
  38.             %if not labelName = %
  39.                 InvertLabel (%labelName%);
  40.             %endif%
  41.             DoPopup (%itemname%, %popupID%, %fieldname%);
  42.             X%Fieldname% := %fieldname%;
  43.             %if not labelName = %
  44.                 InvertLabel (%labelName%);
  45.             %endif%
  46.         end;
  47. %case finish%